<template>
  <!-- 用户信息列表 -->
  <el-container>
    <!-- 1-1 页面头部信息 -->
    <el-header class="header-all">
      <!-- 1-1-1。 查询区域 -->
      <div>
        <el-input
          placeholder="请输入查询的用户姓名"
          v-model="funame"
          style
          class="input-name"
          prefix-icon="el-icon-search"
        ></el-input>
        <el-select v-model="value" placeholder="请选择">
            <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
        </el-select>
        <el-button type="primary" class="but-select" icon="el-icon-search">搜索</el-button>
      </div>
      <!-- 1-1-2. 功能区域 -->
      <div class="div-header-but">
        <el-button type="primary" plain class="but-select">新增</el-button>
      </div>
    </el-header>
    <!-- 列表区域 -->
    <el-main>
      <el-table :data="userList">
        <el-table-column prop="code" align="left" width="130px" label="人员编号"></el-table-column>
        <el-table-column prop="uname" align="left" width="130px" label="姓名"></el-table-column>
        <el-table-column prop="性别" align="left" width="130px" label="性别"></el-table-column>
        <el-table-column prop="学号" align="left" width="130px" label="年龄"></el-table-column>
        <el-table-column prop="身份" align="left" width="130px" label="身份证号"></el-table-column>
        <el-table-column prop="ruTime" align="left" width="130px" label="入职日期"></el-table-column>
        <el-table-column prop="cTime" align="left" width="130px" label="创建日期"></el-table-column>
        <el-table-column width="200px" label="操作">
          <template slot-scope="{}">
            <el-button type="success" plain class="but-select">编辑</el-button>
            <el-button type="danger" plain class="but-select">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-main>
  </el-container>

  <!-- 模板表单 -->
</template>
<script>
export default {
  name: "empList",
  data() {
    return {
      funame: "",
      userList: [
        {
          code: "01",
          uname: "宋丹丹",
          性别: "女",
          学号: "1578452",
          身份: "120159753232356",
          ruTime: "1901-1-1",
          cTime: "1901-1-5"
        },
        {
          code: "02",
          uname: "张国荣",
          性别: "男",
          学号: "1578453",
          身份: "120159753232378",
          ruTime: "1901-1-1",
          cTime: "1901-2-5"
        },
        {
          code: "03",
          uname: "李鹏",
          性别: "男",
          学号: "1578453",
          身份: "120159753232314",
          ruTime: "1901-1-1",
          cTime: "1901-3-5"
        }
      ],
      options: [{
          value: '选项1',
          label: '姓名'
        }, {
          value: '选项2',
          label: '性别'
        }],
        value1: [],
        value2: []
    };
  }
};
</script>

<!-- 1-1-1 开始对应每个控件及页面的样式进行绘制 -->
<style scoped>
.input-name {
  width: 300px;
  margin: 0px;
  padding: 0px;
  size: mini;
}

.but-select {
  margin-left: 5px;
  size: mini;
}
.div-header-but {
  margin-left: 5px;
  margin-right: 20px;
  display: inline;
}

.header-all {
  padding: 0px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>